Fix MQTT eventing and upgrade Moquette#1035
Merged
aaronzi merged 1 commit intoJul 19, 2026
Merged
Conversation
aaronzi
marked this pull request as ready for review
July 19, 2026 16:34
Unify MQTT topics, upgrade Moquette, and guard Docker publishing.
aaronzi
force-pushed
the
fix/mqtt-eventing-moquette-upgrade
branch
from
July 19, 2026 17:07
2e9b45f to
78da2f2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
This makes MQTT eventing consistent across the AAS Repository, AAS Service, Submodel Repository, and Submodel Service.
Identifiers in topic paths now use unpadded UTF-8 Base64URL encoding. Full element replacements and
$valuepatches use distinct topics, and the Submodel Service emits the missing bulk patch and attachment events. Nested element creation now publishes the actual child path and payload for both collections and lists. Configured repository names are preserved through all Submodel Repository decorators.The duplicated MQTT client and publishing setup is shared through MQTT core. Moquette is updated to 0.17 and kept in test scope. The shared broker fixture waits for Moquette's actual ephemeral ports, uses a bounded event queue, tracks asynchronous broker failures, closes all clients before shutdown, and covers concurrent publication plus WebSocket and authenticated connections.
Docker publication is fail-closed and only enabled for
eclipse-basyx/basyx-java-server-sdkwhen the repository is not a fork. A small workflow test covers upstream, fork, renamed repository, and missing-metadata cases.Related Issue
Closes #984
Closes #768
Closes #994
Closes #627
MQTT Event Compatibility
This is a canonical-only migration. There is no legacy or dual publication, so subscribers using a changed topic need to update their subscriptions.
Existing events with changed topics or corrected behavior:
$valuePATCH events move from.../{idShortPath}/updatedto.../{idShortPath}/value/updated. Full element PUT remains on.../{idShortPath}/updated.sm-service/submodels/{submodelId}/submodelElements/.... Its$valuePATCH events also use.../value/updated.sm-reposegment in emitted topics.New events:
.../submodelElements/patched..../{idShortPath}/attachment/updatedand.../{idShortPath}/attachment/deleted.Unchanged event contracts include AAS Repository shell CRUD, Submodel Repository submodel CRUD, full element replacement, element deletion, bulk patch, and attachment events, apart from the repository-name correction described above. Existing JSON payload schemas are unchanged except for the nested-create correction from parent payload to child payload.
The public
MqttSubmodelServiceTopicFactorycreate/update/delete methods now require asubmodelId; direct Java callers of those methods need to update. General encoder APIs and feature-specific configuration entry points remain available.BaSyx Configuration for Testing
No special BaSyx configuration is required. The MQTT tests start an embedded Moquette broker with persistence and telemetry disabled.
AAS Files Used for Testing
None. The tests create their AAS and submodel fixtures directly.
Additional Information
The MQTT core and all four MQTT feature suites pass, including collection/list nested-create regression tests and a 100-event concurrent stress case. The focused reactor also passed three times with Maven
-T 4parallelism. Anonymous/authenticated TCP, rejected credentials, WebSocket connections, broker error propagation, bounded queue handling, and client cleanup are covered.The Docker guard behavior tests and workflow YAML checks pass. Runtime dependency checks contain no Moquette; Moquette 0.17 is test-only and reload4j is excluded. New source, test, workflow, and script files use the repository's full MIT license header.
A full reactor run still reaches existing tests that require external token and Kafka services; those failures are unrelated to this change.